<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/main.css"/>
    <script type="text/javascript" src="/Public/Admin/js/libs/modernizr.min.js"></script>
    <script src="/Public/Admin/js/libs/jquery.js"></script>
    <script src="/Public/Admin/js/libs/list.js"></script>
</head>
<body>
<?php echo W("Public/topShow");?>
<div class="container clearfix">
    <?php echo W("Public/sideShow");?>
    <!--/sidebar-->
    <div class="main-wrap">
      
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo U('index/index');?>">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="<?php echo U('ClassInfo/index');?>">分类管理</a><span class="crumb-step">&gt;</span><span>新增分类</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
              <form action="<?php echo U('ClassInfo/doModSubClass');?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
		<table class="insert-tab" width="100%">
                  <tbody>
                    <tr>
                      <th><i class="require-red">*</i>所属类别：</th>
                      <td>
			<select name="pid">
			  <option value="0">顶级栏目</option>
			  <?php if(is_array($category)): foreach($category as $key=>$categorys): ?><option value="<?php echo ($categorys["id"]); ?>" <?php if($categorys['id'] == I('get.id')): ?>selected<?php endif; ?>><?php echo ($categorys["catname"]); ?></option>
			    <?php if($categorys['child']): if(is_array($categorys['child'])): foreach($categorys['child'] as $key=>$child): ?><option value="<?php echo ($child["id"]); ?>" <?php if($child['id'] == I('get.id')): ?>selected<?php endif; ?>>&nbsp;&nbsp;&nbsp;|-<?php echo ($child["catname"]); ?></option><?php endforeach; endif; endif; endforeach; endif; ?>
			</select>
                      </td>
                    </tr>
                    <tr>
                      <th><i class="require-red">*</i>名称：</th>
                      <td>
			<input class="common-text required" required id="title" name="catname" size="50" value="<?php echo ($info["catname"]); ?>" type="text">
                      </td>
                    </tr>
		    <tr>
                      <th>图片：</th>
                      <td>
			<input class="common-text required"  id="title" name="image" size="50"  type="file">
			<img src="<?php echo ($info["image"]); ?>" alt="无图" width="50px" height="50px">
                      </td>
                    </tr>
                    <tr>
                      <th><i class="require-red">*</i>排序：</th>
                      <td>
			<input class="common-text required" required id="title" name="sort" value="<?php echo ($info["sort"]); ?>" size="50"  type="text">
                      </td>
                    </tr>
                    <tr>
                      <th>栏目内容：</th>
                      <td >
			<!-- 加载编辑器的容器 -->
			<script id="container" name="content" style="width:100%" type="text/plain">
			  <?php echo ($info["content"]); ?>
			</script>
			<!-- 配置文件 -->
			<script type="text/javascript" src="/Public/Admin/utf8-php/ueditor.config.js"></script>
			<!-- 编辑器源码文件 -->
			<script type="text/javascript" src="/Public/Admin/utf8-php/ueditor.all.js"></script>
			<!-- 实例化编辑器 -->
			<script type="text/javascript">
			 var ue = UE.getEditor('container');
			</script>
                      </td>
                    </tr>
                    <tr>
                      <th></th>
                      <td>
			<input type="hidden" name="id" value="<?php echo ($info["id"]); ?>">
			<input id="submit" class="btn btn-primary btn6 mr10" value="提交" <?php if($info['pid'] == 0): ?>disabled="disabled";<?php endif; ?> type="submit">
			<input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                      </td>
                    </tr>
                  </tbody>
                </table>
              </form>
            </div>
        </div>
	
    </div>
    <!--/main-->
</div>
</body>
</html>